﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>概览</title>
    <script type="text/javascript" src="../../assets/js/common/iss_app_utility.js?time=20171213174312"></script>
    <script type="text/javascript" src="../../assets/js/iss_app_configure.js?time=20171213174312"></script>
</head>
<body>
    <div class="statusbar-overlay">
    </div>
    <div class="panel-overlay">
    </div>
    <div class="views">
        <div class="view view-main">
            <div class="pages navbar-fixed">
                <div class="page body_bg overview">
                    <!-- navbar 开始 -->
                    <div class="navbar theme-transparent">
                        <div class="navbar-inner">
                            <div class="left">
                                <a href="#" data-href="../home/index_new.html" data-panel="left" class="link icon-only">
                                    <i class="iconfont icon-shouye"></i></a>
                            </div>
                            <div class="center" style="background-color: Blue;">
                                鱼骨洞景区</div>
                            <div class="right">
                            </div>
                        </div>
                    </div>
                    <!-- navbar 结束 -->
                    <div class="page-content" id="allmap">

                    </div>
                </div>
            </div>
            <!-- end view-main-->
        </div>
    </div>
    <!-- 外部链接 -->
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <!-- Framework7 Library JS-->
    <script type="text/javascript" src="../../assets/js/base/framework7.min.js?time=20171213174312"></script>
    <!-- Api -->
    <script type="text/javascript" src="../../assets/js/base/iss_api_base64.js?time=20171213174312"></script>
    <!-- App js-->
    <script type="text/javascript" src="../../assets/js/common/iss_app.js?time=20171213174312"></script>
    <script type="text/javascript" src="../../assets/js/common/iss_app_common_user.js?time=20171213174312"></script>
    <script type="text/javascript" src="../../assets/js/common/iss_app_convertor.js?time=20171213174312"></script>
    <script type="text/javascript" src="../../assets/js/base/iss_api_base64.js?time=20171213174312"></script>     <script type="text/javascript" src="../../assets/js/base/iss_api_md5.js?time=20171213174312"></script>     <script type="text/javascript" src="../../assets/js/common/iss_view_login.js?time=20171213174312"></script>
    <!-- 地图 -->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=GndkiDfUjGj8z5l6difgcZiK"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/library/AreaRestriction/1.2/src/AreaRestriction_min.js"></script>
    <script type="text/javascript">

        // 百度地图API功能
//        var map = new BMap.Map("allmap");            // 创建Map实例
//        var point = new BMap.Point(116.404, 39.915); // 创建点坐标
//        map.centerAndZoom(point, 15);                 // 初始化地图,设置中心点坐标和地图级别。
//        map.enableScrollWheelZoom();                 //启用滚轮放大缩小
        var tileLayer = new BMap.TileLayer({ isTransparentPng: true });
        tileLayer.getTilesUrl = function (tileCoord, zoom) {
            var x = tileCoord.x;
            var y = tileCoord.y;
            return "http://developer.baidu.com/map/jsdemo/img/border.png";
        }

        // 百度地图API功能
        var map = new BMap.Map('allmap');
        map.addControl(new BMap.NavigationControl());
        map.centerAndZoom(new BMap.Point(116.332782, 40.007978), 16);
        var tileLayer = new BMap.TileLayer({ isTransparentPng: true });
        tileLayer.getTilesUrl = function (tileCoord, zoom) {
            var x = tileCoord.x;
            var y = tileCoord.y;
            return 'http://developer.baidu.com/map/jsdemo/demo/tiles/' + zoom + '/tile' + x + '_' + y + '.png';  //根据当前坐标，选取合适的瓦片图
        }
        //map.removeTileLayer(tileLayer);
        var MyMap = new BMap.MapType('MyMap', tileLayer, { minZoom: 9, maxZoom: 11 });
        map = new BMap.Map('allmap', { mapType: MyMap });

        //设置中心点
        centerPoint = new BMap.Point(107.206215, 29.110035);
        if (!centerPoint) {
            centerPoint = new BMap.Point(116.404, 39.915);
        }
        map.centerAndZoom(new BMap.Point(107.206215, 29.110035), 9);

//        //百度地图API功能    
//        var map = new BMap.Map("allmap");
//        map.centerAndZoom(new BMap.Point(116.404, 39.915), 13);
//        // map.centerAndZoom(new BMap.Point(116.027143, 39.772348),13); // 测试为左下角的位置
//        // map.centerAndZoom(new BMap.Point(116.832025, 40.126349),13); // 测试为右上角的位置
//        map.enableScrollWheelZoom(); // 允许滚动
//        var b = new BMap.Bounds(new BMap.Point(116.027143, 39.772348), new BMap.Point(116.832025, 40.126349)); // 范围 左下角，右上角的点位置 
//        try {    // js中尽然还有try catch方法，可以避免bug引起的错误
//            BMapLib.AreaRestriction.setBounds(map, b); // 已map为中心，已b为范围的地图
//        } catch (e) {
//            // 捕获错误异常
//            alert(e);
        //        }

//        //百度地图API功能	
//        var map = new BMap.Map("allmap");
//        map.centerAndZoom(new BMap.Point(116.404, 39.915), 13);
//        map.enableScrollWheelZoom();
//        var b = new BMap.Bounds(new BMap.Point(116.027143, 39.772348), new BMap.Point(116.832025, 40.126349));
//        try {
//            BMapLib.AreaRestriction.setBounds(map, b);
//        } catch (e) {
//            alert(e);
        //        }

//        // 百度地图API功能
//        var map = new BMap.Map("allmap");
//        var point = new BMap.Point(116.404, 39.915);
//        map.centerAndZoom(point, 15);
//        var marker = new BMap.Marker(point);  // 创建标注
//        map.addOverlay(marker);               // 将标注添加到地图中
//        marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画

    </script>

<!--    <script type="text/javascript">
        // 百度地图API功能
        var sContent =
	"<h4 style='margin:0 0 5px 0;padding:0.2em 0'>天安门</h4>" +
	"<img style='float:right;margin:4px' id='imgDemo' src='http://app.baidu.com/map/images/tiananmen.jpg' width='139' height='104' title='天安门'/>" +
	"<p style='margin:0;line-height:1.5;font-size:13px;text-indent:2em'>天安门坐落在中国北京市中心,故宫的南侧,与天安门广场隔长安街相望,是清朝皇城的大门...</p>" +
	"</div>";
        var map = new BMap.Map("allmap");
        var point = new BMap.Point(116.404, 39.915);
        var marker = new BMap.Marker(point);
        var infoWindow = new BMap.InfoWindow(sContent);  // 创建信息窗口对象
        map.centerAndZoom(point, 15);
        map.addOverlay(marker);
        marker.addEventListener("click", function () {
            this.openInfoWindow(infoWindow);
            //图片加载完毕重绘infowindow
            document.getElementById('imgDemo').onload = function () {
                infoWindow.redraw();   //防止在网速较慢，图片未加载时，生成的信息框高度比图片的总高度小，导致图片部分被隐藏
            }
        });
</script>-->
</body>
</html>
